package com.example.basicdemo.model.builder;

import com.example.basicdemo.model.domain.RoleParamDomain;
import com.isyscore.os.dev.api.IsyscoreRequestBuilder;
import com.isyscore.os.dev.util.IsyscoreHashMap;
import com.isyscore.os.dev.util.RequestUtils;

import javax.servlet.http.HttpServletRequest;

public class SaveRoleAclRequestBuilder extends IsyscoreRequestBuilder {
    private IsyscoreHashMap headers;

    private RoleParamDomain bizModel;

    public RoleParamDomain getBizModel() {
        return bizModel;
    }

    public SaveRoleAclRequestBuilder setBizModel(RoleParamDomain bizModel) {
        this.bizModel = bizModel;
        return this;
    }

    public IsyscoreHashMap getHeaders() {
        return headers;
    }

    public SaveRoleAclRequestBuilder setHeaders(IsyscoreHashMap headers) {
        this.headers = headers;
        return this;
    }

    @Override
    public boolean validate() {
        return true;
    }

    @Override
    public IsyscoreRequestBuilder setRequestHeader(HttpServletRequest request) {
        this.headers = RequestUtils.getRequestHeader(request);
        return this;
    }
}
